import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-03-04
 * Time: 13:47
 */
public class test2 {
    /**
     * LeetCode  169  多数元素
     */

    public int majorityElement(int[] nums) {
        Arrays.sort(nums);
        int n = nums.length;
        int ret = nums.length/2;
        return nums[ret];
    }
}
